extends CanvasLayer


@export var pickup_box_factory: INodeFactory = null


func create(item: InventoryItem, position: Vector2) -> PickableComponent:
    var box: PickableComponent = GameService.pickup_box_factory.create()
    if box == null:
        return null
    box.set_item(item)
    box.position = position
    return box

func destroy(box: PickableComponent) -> void:
    pickup_box_factory.destroy(box)
